package cc.ttiot.mapper.domain;

import lombok.Data;
import lombok.NoArgsConstructor;

import static cc.ttiot.enums.TablesInfo.TemperatureAndHumiditySensor;

/**
 * @Description: “温湿度” 数据存储对象
 * @Author WangSuheng
 * @Date 2021/9/30 11:01
 * @Version 1.0
 */

@Data
@NoArgsConstructor
public class TemperatureAndHumidityMsg {
    public final int sensorId = TemperatureAndHumiditySensor.getTableId(); //传感器id: 2
    private float temperature;  //防护门洞室温度
    private float humidity;  //湿度
    private String time;//时间: yyyy-MM-dd hh-mm-ss.SSS

    public TemperatureAndHumidityMsg(float temperature, float humidity, String time) {
        this.temperature = temperature;
        this.humidity = humidity;
        this.time = time;
    }

    @Override
    public String toString() {
        return "TemperatureAndHumidityMsg{" +
                "sensorId=" + sensorId +
                ", temperature=" + temperature +
                ", humidity=" + humidity +
                ", time='" + time + '\'' +
                '}';
    }
}
